<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>

        // keys() ：返回键名的遍历器
        // values() ：返回键值的遍历器
        // entries() ：返回键值对的遍历器
        // forEach() ：使用回调函数遍历每个成员
        var arrs=["aa","bb","cc","dd"];
        var it=arrs.keys();//数组所有的索引的遍历器
        // console.log(it.next());
        // console.log(it.next());
        // console.log(it.next());
        // console.log(it.next());
        // console.log(it.next());
        var next=it.next();
        while(!next.done){
            console.log(next.value);
            next=it.next();

        }

        var it2=arrs.entries();
        var next2=it2.next();
        while(!next2.done){
            console.log(next2.value);
            next2=it2.next();

        }

        var set=new Set([122,33,1,2,31,1,1]);
        var keys=set.keys();
        console.log(keys.next());
        console.log(keys.next());
        console.log(keys.next());
        console.log(keys.next());
        console.log(keys.next());
        console.log(keys.next());
      
        

    </script>
</head>
<body>
    
</body>
</html>